<?php
namespace plugin\dianzishouxieqianming\validate; 
 
use app\common\validate\BaseValidate;


class ArticleValidate extends BaseValidate
{
    protected $rule = [  
    ];

    protected $message = [
              'id.require' => 'id不得为空',
              
              'id.number' => 'id必须为数字',
              
              'id.max' => 'id不能超过20个字符',
              
              'title.require' => '标题不得为空',
              
              'title.max' => '标题必须是字符串类型',
              
              'title.max' => '标题不能超过255个字符',
              
              'content.require' => '内容不得为空',
              
              'content.max' => '内容必须是字符串类型',
              
              'content.max' => '内容不能超过18888个字符',
              //数据验证提示
                                                 ];

       /**
      * @notes  switch_open  
      * @date 2023-11-19 19:11:39
      * @author 半米科技低代码一键生成
      */
      public function   sceneswitch_open(){ 
                   return $this->append('id','require|number|length:0,20');
       }

                 /**
      * @notes  pass  
      * @date 2023-11-19 19:11:39
      * @author 半米科技低代码一键生成
      */
      public function   scenepass(){ 
                   return $this->append('id','require|number|length:0,20');
       }

                 /**
      * @notes  refuse  
      * @date 2023-11-19 19:11:39
      * @author 半米科技低代码一键生成
      */
      public function   scenerefuse(){ 
                   return $this->append('id','require|number|length:0,20');
       }

                 /**
      * @notes  edit  
      * @date 2023-11-19 19:11:39
      * @author 半米科技低代码一键生成
      */
      public function   sceneedit(){ 
                   return $this->append('id','require|number|length:0,20')->append('title','require|length:0,255')
                   ->append('content','require|length:0,18888');
       }

                 /**
      * @notes  dels  
      * @date 2023-11-19 19:11:39
      * @author 半米科技低代码一键生成
      */
      public function   scenedels(){ 
                   return $this->append('id','require|number|length:0,20');
       }

          //数据验证方法

}